package com.ds.infrastructure.audit.collector.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ds.infrastructure.audit.collector.entity.App;

/**
 * 作用：
 *
 * @author WeiShaoying
 * @date 2020/8/4
 */
public interface IAppService extends IService<App> {

    /**
     * 通过appName,appKey查询
     *
     * @param appName
     * @param appKey
     * @return
     */
    App queryByCondition(String appName, String appKey);

    /**
     * 保存
     *
     * @param app
     */
    void saveApp(App app);

    /**
     * 删除
     *
     * @param appId
     */
    boolean deleteAppById(Long appId);

    /**
     * 更新
     *
     * @param app
     */
    boolean updateApp(App app);

    /**
     * @param appName
     * @param appKey
     * @return
     */
    String getKey(String appName, String appKey);

    /**
     * 判断是否为注册APP
     *
     * @param appName
     * @param appKey
     * @return
     */
    boolean isRegisteredApp(String appName, String appKey);
}
